package com.system.outpatientsystem.mapper;

import com.system.outpatientsystem.pojo.registration_table;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RegistrationMapper {
    @Insert("INSERT INTO registration_table(user_id, doctor_id,begin_time)" +
            " VALUES (#{userId}, #{doctorId},now())")
    void createtable(Integer doctorId, Integer userId);

    @Select("select * from registration_table where user_id=#{userId}")
    List<registration_table> list(Integer userId);
}
